//
//  test_null.h
//  TestMac
//
//  Created by 小星星吃KFC on 2021/6/4.
//


#import <Foundation/Foundation.h>
#import "AXCheck.h"


static void test_null(void){
    
    NSLog(@"ax_objc_is_nil = %d",ax_objc_is_nil(nil));
    NSLog(@"ax_objc_is_not_nil = %d",ax_objc_is_not_nil(nil));
    NSString *str = nil;
    NSLog(@"isEmpty = %d",[AXCheck isEmpty:str]);
    
    
    NSLog(@"ax_objc_is_empty = %d",ax_objc_is_empty(@""));
    NSLog(@"ax_objc_is_empty = %d",ax_objc_is_empty(nil));
    NSLog(@"ax_objc_is_not_empty = %d",ax_objc_is_not_empty(@""));
    NSLog(@"ax_objc_nil_defaults jim= %@",ax_objc_nil_defaults(nil, @"jim"));
    NSLog(@"ax_objc_nil_defaults tom= %@",ax_objc_nil_defaults(@"", @"tom"));
    {
        NSArray  *arr = @[@{@"name":@"jim"}];
        NSLog(@"ax_objc_class_nil_value NSString = %@",ax_objc_class_nil_value(arr.firstObject,NSString.class, @"tom"));
        NSLog(@"ax_objc_class_nil_value NSString nil = %@",ax_objc_class_nil_value(arr.firstObject,NSString.class, nil));

    }
    NSLog(@"ax_objc_class_nil_value NSDictionary 1 = %@",ax_objc_class_nil_value(nil,NSDictionary.class, @"tom"));
    NSLog(@"ax_objc_class_nil_value NSDictionary 2= %@",ax_objc_class_nil_value(nil,NSDictionary.class, @{}));
    {
        
        NSArray *arr = @[@"A",@{}];
        NSLog(@"arr = %@",arr);
    }
    {
        NSArray *arr = @[@"A",@{}];
        NSLog(@"ax_objc_in_arrar_class_nil_value = %@",ax_objc_in_arrar_class_nil_value(arr,2,NSDictionary.class, @"jim"));

        
    }
    {
        NSArray *arr = @[@"",@{}];
        NSLog(@"ax_objc_in_arrar_class_nil_value2 =😝 %@😝",ax_objc_in_arrar_class_nil_value(arr,0,NSString.class,nil));
        NSLog(@"ax_objc_in_arrar_class_nil_valuelength =😝 %ld😝",[ax_objc_in_arrar_class_nil_value(arr,0,NSString.class,nil) length]);
        NSLog(@"ax_objc_in_arrar_class_nil_value ax_objc_is_nil = %d",ax_objc_is_nil(ax_objc_in_arrar_class_nil_value(arr,0,NSString.class,nil)));

        
    }
    {
        NSArray *arr = @[@"",@{}];
        NSLog(@"ax_objc_in_arrar_class_nil_value null = %d",ax_objc_is_nil(ax_objc_in_arrar_class_nil_value(arr,0,NSString.class,nil)));

        
    }
    
    // <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
   
    // <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
//    NSDictionary *dic = nil;
}

